package util;

import java.io.File;

import android.os.Environment;

public class FileUtil {

	public static String myAppPath = "myAppPath/";

	private FileUtil() {
	}

	public static String getSDCardDir() {
		String sdDir = "";
		String state = Environment.getExternalStorageState();
		if (Environment.MEDIA_MOUNTED.equals(state)) {
			sdDir = Environment.getExternalStorageDirectory().getAbsolutePath();
		}
		return sdDir;
	}

	public static String getMyAppPath() {
		String path = getSDCardDir() + File.separator + myAppPath;
		File file = new File(path);
		if (!file.exists()) {
			file.mkdirs();
		}
		return path;
	}
}
